package four;

public class Client {
    public static void main(String[] args) {
        // 通过苹果工厂生产苹果电脑
        ComputerFactory appleFactory = new AppleFactory();
        Computer appleComputer = appleFactory.createComputer();
        appleComputer.start();
        appleComputer.shutdown();

        System.out.println();

        // 通过华为工厂生产华为电脑
        ComputerFactory huaWeiFactory = new HuaweiFactory();
        Computer huaWeiComputer = huaWeiFactory.createComputer();
        huaWeiComputer.start();
        huaWeiComputer.shutdown();
    }
}
